/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mfi.models;

import java.util.ArrayList;
import java.util.Date;

/**
 *
 * @author Apol
 */
public class Transaction {

    private int trans_id;
    private int account_id;
    private int address;
    private String date_purchased;
    private double total_amount;
    private String status;
    private ArrayList<CartItem> items;

    public Transaction() {
        this.trans_id = 0;
        this.account_id = 0;
        this.address = 0;
        this.date_purchased = "";
        this.total_amount = 0.0;
        this.status = "";
        this.items = new ArrayList<CartItem>();
    }

    public Transaction(int trans_id, int account_id, int address, String date_purchased, double total_amount, String status) {
        this.trans_id = trans_id;
        this.account_id = account_id;
        this.address = address;
        this.date_purchased = date_purchased;
        this.total_amount = total_amount;
        this.status = status;
        this.items = new ArrayList<CartItem>();
    }

    public int getAccount_id() {
        return account_id;
    }

    public void setAccount_id(int account_id) {
        this.account_id = account_id;
    }

    public int getAddress() {
        return address;
    }

    public void setAddress(int address) {
        this.address = address;
    }

    public String getDate_purchased() {
        return date_purchased;
    }

    public void setDate_purchased(String date_purchased) {
        this.date_purchased = date_purchased;
    }

    public double getTotal_amount() {
        return total_amount;
    }

    public void setTotal_amount(double total_amount) {
        this.total_amount = total_amount;
    }

    public int getTrans_id() {
        return trans_id;
    }

    public void setTrans_id(int trans_id) {
        this.trans_id = trans_id;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public ArrayList<CartItem> getItems() {
        return items;
    }

    public void setItems(ArrayList<CartItem> items) {
        this.items = items;
    }
    
    public void addItem(CartItem item) {
        this.items.add(item);
    }
    
}
